// dlg.txt

//	mark_quest_dest(zone,x,y,layer,quest);
//	cancel_out_fight(0,short kill_enc)
//	make_outdoor_enc(short x,short y,short which_enc);
//	set_out_fight_field(short which_field);

begintalkscript;

variables;

short this_sec = 23;

begintalknode;
	tag = 1;
	condition = get_sdf(100 + this_sec,1) == 0;
	text1 = "The northern and southern halves of the High Litha are separated by the Fangs of Judgment. It is a small but imposingly walled fortress, completely blocking this pass.";
	text2 = "The mountains to the west are tall, jagged, windswept, and covered with sheer ice. The river to the east is freezing cold and full of rapids. This fort is your only route to the highest realms of the Rokaj.";
	text3 = "Yet, this place is odd. It shouldn't be here. Since the Great Uprising, the Rokaj has been forbidden to build protective walls. Yet these barriers, centuries old, still stand proud, blocking your way.";
	text4 = "From here, you can see that the gate is closed to you. You will have to get closer to learn more.";
	code =
		sf(100 + this_sec,1,1);
	break;
	
begintalknode;
	tag = 2;
	condition = get_sdf(100 + this_sec,2) == 0;
	text1 = "This valley is blocked from the icy wind by tall peaks to either side. It has created a little pocket of warmth, in which a few small patches of crops can survive. The few Ro who live up here mainly live on forage and wild game.";
	text2 = "The ancient Rokaj city of Etzalam is tucked into a small and easily protected side valley to the west. You can see its old crumbling buildings and the remnants of its walls.";
	text3 = "When guard towers see your approach, many horns are blown. A few dozen High Lithans come out of the city to see the approach of the Havenite who shattered their walls. They watch you for a few minutes. Then they shrug and return to the warmth of their homes.";
	code =
		sf(100 + this_sec,2,1);
	break;

begintalknode;
	tag = 3;
	condition = get_sdf(100 + this_sec,3) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,3,1);
	break;

begintalknode;
	tag = 4;
	condition = get_sdf(100 + this_sec,4) == 0 && ((party_has_item(585)) || (party_has_item(586)) || (party_has_item(587)));
	text1 = "From the nearby lake, you hear a furious roar. You look out over the water and see a single ship. It's a sailing vessel, waving the black skull flag of a pirate ship. It is, of course, impossible for a sailing ship of this size to come this far inland.";
	text2 = "The deck is crowded with ... people? They are vague, insubstantial forms, barely visible in the distance. They are shouting a furious message at you, though you can't understand a word of it.";
	text3 = "And then, a moment later, they vanish. Gone. You only see the lake.";
	code =
		sf(100 + this_sec,4,1);
	break;

begintalknode;
	tag = 5;
	condition = get_sdf(100 + this_sec,5) == 0;
	text1 = "You emerge from the smoking ruins of the Fangs of Judgment. To the north, you see Ro. A merchant caravan. Some scouts. A few warriors. All are staring in shock at the remnants of their mighty wall.";
	text2 = "Then they turn and leave. Not a panicked flight, but they aren't slow. Soon, news of what happened here will spread through the High Litha. And then the Rokaj. Queen Sharyn ordered that Haven show its power. It has been done.";
	code =
		sf(100 + this_sec,5,1);
		if (gf(80,12) < 6)
			sf(80,12,6);

		run_game_hardcode(1007);
	break;

begintalknode;
	tag = 6;
	condition = get_sdf(100 + this_sec,6) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,6,1);
	break;

begintalknode;
	tag = 7;
	condition = get_sdf(100 + this_sec,7) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,7,1);
	break;

begintalknode;
	tag = 8;
	condition = get_sdf(100 + this_sec,8) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,8,1);
	break;

begintalknode;
	tag = 9;
	condition = get_sdf(100 + this_sec,9) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,9,1);
	break;

begintalknode;
	tag = 10;
	condition = get_sdf(100 + this_sec,10) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,10,1);
	break;

begintalknode;
	tag = 11;
	condition = get_sdf(100 + this_sec,11) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,11,1);
	break;

begintalknode;
	tag = 12;
	condition = get_sdf(100 + this_sec,12) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,12,1);
	break;

// MIXED

begintalknode;
	tag = 13;
	condition = gf(123,13) == 0;
	text1 = "A band of High Lithan warriors, dressed in multiple layers of leather and armed with scourges, patrols this road. When you get close, they step off and disappear into the woods. After you have safely passed, they emerge from the wastes and continue their patrol.";
	code =
		sf(123,13,1);
	break;
	
begintalknode;
	tag = 14;
	condition = 1;
	text1 = "You hear howling in the distance. The light gray fur of the wolves keeps you from noticing them until they are on you. It's amazing how fast they can run, and a draft of icy sleet blows ahead of them as they charge.";

begintalknode;
	tag = 15;
	condition = 1;
	text1 = "There is a band of Rokaj merchants and warriors sitting by this fire, warming themselves in the shadows of the Fangs of Judgment. Then they see you approach.";
	text2 = "They immediately find different places to be. They all leave the fire in different directions. Some disappear into the trees. Others walk into the fort. By the time you reach the fire, the Ro have successfully avoided you.";
	text3 = "There is a band of Rokaj merchants and warriors sitting by this fire, warming themselves in the shadows of the Fangs of Judgment. Then they see you approach.";
	text4 = "They extend to you the barest courtesy, the minimum expected of the Ro. You get a spot by the fire and they share their thin venison stew. However, they refuse to talk. You suspect they are still a little sore about the way you blew up their wall.";
	code =
		if (gf(80,12) < 6) {
			rs(3); rs(4);
			cancel_out_fight(0,1);
			}
			else {
				rs(1); rs(2);
				}
	break;
	
begintalknode;
	tag = 16;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 17;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 18;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 19;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 20;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 21;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 22;
	condition = 1;
	text1 = "__";

////

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "You find an informal merchant camp at the south end of this valley. Traders, hunters, and miners can come here to trade without fear of extra questions or taxation from the officials in the towns.";
	text2 = "When you enter their camp, they don't flee. They don't look happy to see you either.";
	text3 = "You return to the camp. They don't seem any happier to see you than they were before.";
	code =
		if (gf(123,12) == 0) {
			sf(123,12,1);
			rs(3);
			}
			else rs(2);
	break;
	
begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Ask some questions.";
	text1 = "As expected, you are able to get only the barest of grunts and grumbles. You're sure the travelers here have heard plenty in their travels. They would not be caught dead sharing any of it with you. [P] or not.";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = gf(80,16) < 110;
	question = "Try to trade with them.";
	text1 = "The merchants humbly say that they have nothing you would be interested in. You can tell that they have no trust in you.";
	text2 = "If the Rokaj had a higher opinion of you, you might be able to get a few words (or some rations) out of them. For now, they'll have nothing to do with you.";
	action = END_TALK;
	
begintalknode;
	state = 10;
	nextstate = 11;
	condition = gf(80,16) >= 110;
	question = "Try to trade with them.";
	text1 = "Surprisingly, when you approach in kind of a friendly way, they are receptive. They have actually heard enough good things about you to be willing to give you the time of day.";
	text2 = "They take you to a humble wagon and pull away a tarp, revealing a variety of interesting supplies.";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Just go.";
	text1 = "They watch with great relief as you go. They are angry that you blew up their wall, so much so that they won't even touch your money.";
	action = END_TALK;
	
begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "_Let me see your wares._";
	text1 = "You conclude your business.";	
	code = 
		begin_shop_mode("Lithan Merchants",
		  "shopdesc.",
		  31,5,0);	
	break;

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Just go.";
	text1 = "They watch with great relief as you go. Many are angry that you blew up their wall, so they don't want to be seen trading with you.";
	action = END_TALK;


begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "_I want to sell something._";
	text1 = "You conclude your business.";	
	code = 
		start_alter_items(0);
	break;

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "End your business.";
	text1 = "The Lithans nod and wave as you depart. They don't like you. They don't trust you. They are angry that you blew up their wall. But they do like you enough to take your money.";
	action = END_TALK;


	
//

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

	
//

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";


//

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 100;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 100;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 130;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 160;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 160;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
		
//

begintalknode;
	tag = 190;
	state = -1;
	nextstate = 190;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
				